package com.java8feature.generic;

import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.Map;

/**
 * @Description:
 * @Author: yangzhiwei
 * @Date: 2021/5/15 13:49
 */
public class TestTestT {
    public static void main(String[] args) {
        Type t = new Test<Map<String,String>>(){}.getClass().getGenericSuperclass();
        Type targ = ((ParameterizedType) t).getActualTypeArguments()[0];

        ThreadLocal tl = new ThreadLocal(){ public void fun() {
            System.out.println("test");
        }};



//        Type t = new Base<Map<String, List<String>>>() {
//        }.getClass().getGenericSuperclass();
//        Type targ = ((ParameterizedType) t).getActualTypeArguments()[0];
        System.out.println(targ);
    }
}
